package io;

import java.io.File;
import java.io.IOException;
import java.util.Scanner;

public class Demo3 {
    public static void main(String[] args) throws IOException {
//        Scanner scanner = new Scanner(System.in);
//        File f = new File("./test.txt");
//        //文件删除
////        f.deleteOnExit();
//        String s = scanner.nextLine();
//        System.out.println(f.exists());
        File file = new File("some-file.txt");        // 要求该⽂件不存在，才能看到
        System.out.println(file.exists());
        System.out.println(file.createNewFile());
        System.out.println(file.exists());
        file.deleteOnExit();
        System.out.println(file.exists());
    }
}
